package thread;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class SleepDemo {
    public static void main(String[] args) throws IOException {
        System.out.println("程序开始了");
        Scanner scan = new Scanner(System.in);

        /*
        BufferedReader br = new BufferedReader(
                new InputStreamReader(
                        System.in//低级流从控制台上读取内容
                )
        );
        String line = br.readLine();//获取一行字符串
        int num = Integer.parseInt(line);//将字符串转换为整数
        */


            for (int i = scan.nextInt(); i > 0; i--) {
                System.out.println(i);
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
            }
        }

        System.out.println("时间到");
    }
}
